package com.emm.yixun.openapi.hander;

import com.emm.yixun.common.app.GetMerchantResouceReqDto;
import com.emm.yixun.common.app.GetMerchantResouceResDto;
import com.emm.yixun.openapi.dto.base.BaseRequestDTO;
import com.emm.yixun.openapi.dto.base.BaseResponseDTO;
import com.emm.yixun.openapi.hander.base.CommonAbstractHander;
import com.emm.yixun.openapi.vo.GetMerchantResouceReqVo;
import com.emm.yixun.system.service.app.MerchantResourcesAppFacade;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by Administrator on 2017/8/15.
 */
@Service("getMerchantResouceLCHander")
public class GetMerchantResouceLCHander extends CommonAbstractHander {
    @Autowired
    private MerchantResourcesAppFacade resourcesConfigAppFacade;

    @SuppressWarnings("rawtypes")
    @Override
    public BaseResponseDTO doBusiness(BaseRequestDTO reqDto) {
        GetMerchantResouceReqVo req = (GetMerchantResouceReqVo) reqDto;
        GetMerchantResouceReqDto reqDto1 = req.getParams();
        BaseResponseDTO<GetMerchantResouceResDto> res = new BaseResponseDTO<GetMerchantResouceResDto>();
        res.setResData(resourcesConfigAppFacade.findMerchantResourceByDto(reqDto1));
        return res;
    }

}